/ * 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
           A r m a d i l l o   S t a n d a r d   -   O E P   F i n d e r   a n d   I m p o r t   R e d i r e c t i o n   F i x e r   ( L o g g i n g   I m p o r t   A d d r e s s e s ) 
 
                                 T e s t e d   o n   :   A r m a d i l l o   3 . x x   -   4 . x x   ( L o g g e r   f o r   3 . 7 x   a n d   a b o v e ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 
 
 T h i s   s c r i p t   c a n   b e   u s e d   f o r   A r m a d i l l o   S t a n d a r d ,     a n d   C h i l d   P r o c e s s   o f   D e b u g B l o c k e r   &   C o p y M e m - I I . 
 
 J u s t   d e t a c h   c h i l d   f r o m   f a t h e r   b y   " A r m a d i l l o   D e t a c h   F a t h e r "   s c r i p t ,   w r i t t e n   b y   " h i p u " ,   o r   u s e   
 
 " A r m a D e t a c h . e x e "   o f   { R E S } .   T h e n   A t t a c h   i t   u s i n g   O l l y D b g ,   f i x   E B   F E   t o   o r g i n a l   b y t e s ,   a n d   u s e   m y   s c r i p t . 
 
 
 
 
 
 R e q u i r e m e n t s   : 
 
 -   O S   :   W i n X P , W i n 2 0 0 0   ,   O l l y D b g   1 . 1 0   F i n a l ,   O D b g S c r i p t   v 1 . 4 6   o r   a b o v e . 
 
 -   D e b u g g i n g   O p t i o n :   C h e c k   a l l   E x c e p t i o n s ,   a n d   I g n o r e   c u s t o m   e x c e p t i o n s :   C 0 0 0 0 0 0 1 . . C 0 0 0 9 8 9 8 
 
 -   M a k e   s u r e   t h e r e   i s   n o   B r e a k   P o i n t s ,   H a r d w a r e   o r   S o f t w a r e . 
 
 
 
 I ' v e   p a t c h e d   O u t p u t D e b u g S t r i n g A   t o   f i x   O l l y D b g   b u g ,   s o   n o   a d d i t i o n a l   p l u g i n   i s   n e e d e d . 
 
 
 
 H a v e   f u n   ! 
 
 
 
 W r i t e n   b y   :   N e w b i e   C r a c k e r   ( M S ) 
 
 E m a i l   :   n e w b i e _ c r a c k e r _ m s @ y a h o o . c o m 
 
 W e b   :   h t t p : / / u n r e a l - r c e . n e t / 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 * / 
 
 
 
 v a r   C o d e B a s e 
 
 v a r   C o d e E n d 
 
 v a r   G e t M o d u l e H a n d l e A 
 
 v a r   O u t p u t D e b u g S t r i n g A 
 
 v a r   V i r t u a l P r o t e c t 
 
 v a r   C r e a t e T h r e a d 
 
 v a r   A r m a A d d r e s s 
 
 v a r   A r m a B a s e C o d e 
 
 v a r   A r m a S i z e 
 
 v a r   A r m a E n d C o d e 
 
 v a r   M a g i c J M P 
 
 v a r   C a l l O E P 
 
 v a r   T e m p 
 
 
 
 M S G Y N   " P l e a s e   c l e a r   a l l   B r e a k P o i n t s   a n d   i g n o r e   a l l   e x c e p i o n s   +     C 0 0 0 0 0 0 1 . . C 0 0 0 9 8 9 8   i n   c u s t o m   e x c e p t i o n s " 
 
 c m p   $ R E S U L T ,   0 
 
 j e   E x i t 
 
 
 
 g p a   " O u t p u t D e b u g S t r i n g A " ,   " k e r n e l 3 2 . d l l "                 / / P a t c h i n g   O u t p u t D e b u g S t r i n g A   t o   f i x   O l l y D b g   b u g 
 
 m o v   O u t p u t D e b u g S t r i n g A , $ R E S U L T 
 
 a s m   O u t p u t D e b u g S t r i n g A ,   " R e t n   0 4 " 
 
 
 
 g p a   " V i r t u a l P r o t e c t " ,   " k e r n e l 3 2 . d l l "                                 / / U s i n g   V i r t u a l P r o t e c t   t o   g e t   A r m A c c e s s . D L L   c o d e   a d d r e s s 
 
 m o v   V i r t u a l P r o t e c t ,   $ R E S U L T 
 
 b p   V i r t u a l P r o t e c t 
 
 r u n 
 
 
 
 
 
 
 
 b c   V i r t u a l P r o t e c t 
 
 m o v   A r m a A d d r e s s ,   [ e s p + 4 ] 
 
 G M E M I   A r m a A d d r e s s ,   M E M O R Y B A S E                                 / / G e t t i n g   M e m o r y   B a s e   A d d r e s s   o f   A r m A c c e s s . D L L 
 
 m o v   A r m a B a s e C o d e , $ R E S U L T 
 
 G M E M I   A r m a A d d r e s s ,   M E M O R Y S I Z E                                                 / / G e t t i n g   M e m o r y   S i z e   o f   A r m A c c e s s . D L L 
 
 m o v   A r m a S i z e , $ R E S U L T 
 
 m o v   A r m a E n d C o d e , A r m a B a s e C o d e 
 
 a d d   A r m a E n d C o d e , A r m a S i z e 
 
 
 
 g p a   " G e t M o d u l e H a n d l e A " ,   " k e r n e l 3 2 . d l l " 
 
 m o v   G e t M o d u l e H a n d l e A ,   $ R E S U L T 
 
 a d d   G e t M o d u l e H a n d l e A , C 
 
 p r e o p   G e t M o d u l e H a n d l e A                                                                 / / D e f e a t i n g   A r m a d i l l o   I n t 3   C h e c k   o n   A P I s 
 
 m o v   G e t M o d u l e H a n d l e A ,   $ R E S U L T 
 
 e v a l   " [ e s p + 4 ] = = " k e r n e l 3 2 . d l l "   & &   [ e s p ] < { A r m a E n d C o d e }   & &   [ e s p ] > { A r m a B a s e C o d e } " 
 
 b p c n d   G e t M o d u l e H a n d l e A ,   $ R E S U L T 
 
 
 
 g p a   " C r e a t e T h r e a d " ,   " k e r n e l 3 2 . d l l " 
 
 m o v   C r e a t e T h r e a d ,   $ R E S U L T 
 
 e v a l   " [ e s p ] > { A r m a B a s e C o d e }   & &   [ e s p ] < { A r m a E n d C o d e }   & &   [ e s p + 1 0 ] = = 0 "                 / / P u t t i n g   C o n d i t i o n a l   B P   t o   r e m o v e   s t o p p i n g   o n   u n w a n t e d   C r e a t e T h r e a d s   ( L i k e   m o d u l e s ) 
 
 b p c n d   C r e a t e T h r e a d , $ R E S U L T 
 
 
 
 
 
 C o n t i n u e : 
 
 r u n 
 
 
 
                                                 / / F i n d i n g   M a g i c   J u m p 
 
 c m p   e i p , C r e a t e T h r e a d 
 
 j e   N o _ F i x 
 
 r t u 
 
 f i n d   e i p , # A 1 ? ? ? ? ? ? ? ? 3 9 ? ? ? ? 0 f 8 4 # 
 
 c m p   $ R E S U L T , 0 
 
 j e   C o n t i n u e 
 
 b c   G e t M o d u l e H a n d l e A 
 
 
 
 m o v   M a g i c J M P , $ R E S U L T                                 / / M a g i c   J M P   :   F i x i n g   I m p o r t   R e d i r e c t i o n 
 
 A d d   M a g i c J M P ,   8 
 
 m o v   T e m p ,   [ M a g i c J M P ] 
 
 x o r   T e m p ,   6 D 9 F 
 
 m o v   [ M a g i c J M P ] , T e m p 
 
 g p a   " _ s t r i c m p " ,   " m s v c r t . d l l "                                 / / B P   o n   _ s t r i c m p ,   t o   f i n d   I A T   w r i t i n g ,   u s e f u l l   f o r   l o g g i n g   i m p o r t   a d d r e s s e s   ( o p t i o n a l ) 
 
 m o v   s t r i c m p ,   $ R E S U L T 
 
 b p c n d   s t r i c m p , " [ e s p + 8 ] = = " A r m A c c e s s " " 
 
 r u n 
 
 
 
 
 
 b c   s t r i c m p 
 
 c m p   e i p , C r e a t e T h r e a d 
 
 j e   N o _ L o g 
 
 r t u                                                                 / / S i g n i t u r e   f o r   f i n d i n g   I A T   w r i t i n g 
 
 f i n d   e i p , # 7 ? ? ? 8 B 8 5 ? ? ? ? F F F F 8 B 8 D ? ? ? ? F F F F 8 9 0 8 8 B 8 5 ? ? ? ? F F F F 8 3 C 0 0 4 8 9 8 5 ? ? ? ? F F F F E 9 ? ? ? ? F F F F # 
 
 c m p   $ R E S U L T , 0 
 
 j e   N o _ L o g 
 
 m o v   W r i t e I A T , $ R E S U L T 
 
 a d d   W r i t e I A T , 1 0 
 
                                                                 / / E n d   o f   I A T   w r i t i n g .   M u s t   s t o p   o n   i t 
 
 f i n d   e i p , # E 9 ? ? ? ? F F F F 8 B 8 5 ? ? ? ? F F F F 8 9 8 5 ? ? ? ? F F F F F F B 5 ? ? ? ? F F F F E 8 ? ? ? ? 0 0 0 0 5 9 # 
 
 c m p   $ R E S U L T , 0 
 
 j e   N o _ L o g 
 
 b p l   W r i t e I A T , " e a x "                                                 / / L o g g i n g   I m p o r t   a d d r e s s e s   t o   m a k e   u s a g e   o f   I m p R e c   e a s i e r   !   G r e a t   u s a g e   f o r   C o p y M e m - I I 
 
 l o g   "   " 
 
 l o g   " I m p o r t   T a b l e   A d d r e s s e s   :   " 
 
 l o g   "   " 
 
 m o v   E n d o f I A T , $ R E S U L T 
 
 a d d   E n d o f I A T , 5 
 
 b p   E n d o f I A T 
 
 r u n 
 
 
 
 
 
 b c   W r i t e I A T                                                 / / C l e a r i n g   B P s   t o   a v o i d   f a i l u r e   o f   A r m A c c e s s . D L L   C R C   C h e c k 
 
 b c   E n d o f I A T 
 
 r u n 
 
 
 
 R e s u m e :                                                                 / / F i n d i n g   O E P   u s i n g   f a m o u s   C r e a t e T h r e a d   m e t h o d 
 
 b c   C r e a t e T h r e a d 
 
 r t u 
 
 f i n d   e i p ,   # 2 B ? ? F F ? ? 8 ? ? ? ? ? 8 B ? ? ? ? # 
 
 c m p     $ R E S U L T , 0 
 
 j e   N o _ O E P 
 
 
 
 m o v   C a l l O E P ,   $ R E S U L T 
 
 a d d   C a l l O E P ,   2   
 
 b p   C a l l O E P   
 
 r u n   
 
 
 
 
 
 b c   C a l l O E P   
 
 s t i 
 
 l o g   "   " 
 
 l o g   " T h i s   i s   t h e   O E P   : " 
 
 l o g   "   " 
 
 l o g   e i p 
 
 l o g   "   " 
 
 l o g   " F o u n d   b y   N e w b i e   C r a c k e r   ( M S ) " 
 
 l o g   "   " 
 
 c m t   e i p ,   " T h i s   i s   t h e   O E P !   F o u n d   b y   N e w b i e   C r a c k e r   ( M S ) " 
 
 m s g   " N o w ,   d u m p   a n d   f i x   I A T   b y   I m p R e c   a n d   c u t   u n r e s o l v e d   t h u n k s . " 
 
 r e t 
 
 
 
 
 
 N o _ L o g : 
 
 m s g   " C o u l d   n o t   l o g   t h e   I m p o r t   A d d r e s s e s ,   b u t   t h e y ' r e   f i x e d .   Y o u   s h o u l d   f i n d   I m p o r t   A d d r e s s e s   M a n u a l l y .   P r e s s   O K   t o   f i n d   O E P . " 
 
 j m p   R e s u m e 
 
 
 
 
 
 N o _ F i x : 
 
 m s g   " C o u l d   n o t   f i x   I m p o r t   R e d i r e c t i o n .   Y o u   s h o u l d   f i x   t h e m   M a n u a l l y .   P r e s s   O K   t o   f i n d   O E P . " 
 
 j m p   R e s u m e 
 
 
 
 
 
 N o _ O E P : 
 
 m s g   " O E P   n o t   F o u n d !   B u t   i m p o r t s   a r e   f i x e d .   P l e a s e   r e p o r t   m e . " 
 
 r e t 
 
 
 
 E x i t : 
 
 m s g   " N e x t   t i m e ,   d o n ' t   f o r g e t   t o   d o   t h e m   ! " 
 
 r e t 